package com.woniu.crowd.client;

import com.woniu.crowd.client.param.*;
import com.woniu.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@FeignClient(contextId = "selectManageClient", name = "crowd")
public interface SelectManageClient {
    /**
     * 新增甄选商品
     * @param addSelectProductParam
     * @return
     */
    @PostMapping("/addSelectProduct")
    Result addCrowdProduct(@RequestBody AddSelectProductParam addSelectProductParam);
    @PostMapping("userApplySelect")
    public Result userApplySelect(@RequestBody AddSelectApplyParam addSelectApplyParam);

    /**
     * 上架甄选
     * @param upSelectParam
     * @return
     */
    @PostMapping("upSelect")
    public  Result upSelect(@RequestBody UpSelectParam upSelectParam);


    /**
     * 上传测评文件附件
     * @param file
     * @return
     * @throws IOException
     */
    @PostMapping(value = "/SelectuploadFile",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public Result SelectuploadFile(MultipartFile file) throws IOException;

    /**
     * 平台内部测评上传
     * @param addShopTestpParam
     * @return
     */
    @PostMapping("addShopTest")
    public Result addShopTest(@RequestBody AddShopTestpParam addShopTestpParam);

    /**
     * 用户甄选意见上传
     * @param userOpinionParam
     * @return
     */
    @PostMapping("userAddOpinion")
    public Result userAddOpinion(@RequestBody AddUserOpinionParam userOpinionParam);


    /**
     *操作员对甄选申请审核
     */
    @PostMapping("checkApply")
    public Result checkApply(@RequestBody CheckApplyParam checkApplyParam);


}
